#include "mouth_detector.hpp"

void detectAndDrawMouth(cv::Mat &img, const cv::Mat &faceROI, const cv::Rect &face, cv::CascadeClassifier &mouth_cascade)
{
    std::vector<cv::Rect> mouths;
    mouth_cascade.detectMultiScale(faceROI, mouths, 1.3, 5, 0 | cv::CASCADE_SCALE_IMAGE, cv::Size(30, 30));
    for (const auto &mouth : mouths)
    {
        cv::rectangle(img, cv::Point(face.x + mouth.x, face.y + mouth.y),
                      cv::Point(face.x + mouth.x + mouth.width, face.y + mouth.y + mouth.height),
                      cv::Scalar(0, 120, 255), 2);
    }
}

    

